package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * <p>
 * 
 * </p>
 *
 * @author ak
 * @since 2020-04-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "q_id", type = IdType.AUTO)
    private Integer qId;

    @NotEmpty(message = "标题不能为空")
    private String qTitle;

    @NotEmpty(message = "描述不能为空")
    private String qDesc;

    @NotEmpty(message = "标签不能为空")
    private String qTags;

    private Integer qImgId;

    private String qCreate;

    private Integer qViewCount;

    private Integer qCommentCount;

    private Integer qLike;

    private String qAuthor;

    @TableField(exist = false)
    private User user;


}
